
#关闭观战模式
gamemode adventure @a[tag=admin,scores={SystemAdmin=1}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=1}] SystemAdmin 0

#关闭边界
execute if entity @a[tag=admin,scores={SystemAdmin=1000}] run worldborder set 6666666 300
execute if entity @a[tag=admin,scores={SystemAdmin=1000}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 关闭了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 边界模式","color":"green","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]

#1001小型边界模式
execute if entity @a[tag=admin,scores={SystemAdmin=1001}] run worldborder set 30 10
execute as @a[tag=admin,scores={SystemAdmin=1001}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 启用了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 小型边界","color":"green","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 将在10秒内调整","color":"white","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#1002中型边界模式
execute if entity @a[tag=admin,scores={SystemAdmin=1002}] run worldborder set 100 10
execute as @a[tag=admin,scores={SystemAdmin=1002}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 启用了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 中型边界","color":"green","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 将在10秒内调整","color":"white","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#1003大型边界模式（默认）
execute if entity @a[tag=admin,scores={SystemAdmin=1003}] run worldborder set 250 10
execute as @a[tag=admin,scores={SystemAdmin=1003}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 启用了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 大型边界","color":"green","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 将在10秒内调整","color":"white","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#1004世界重生点
execute if entity @a[tag=admin,scores={SystemAdmin=1004}] align xyz positioned ~ ~1 ~ run setworldspawn ~ ~ ~
execute as @a[tag=admin,scores={SystemAdmin=1004}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 在其位置设置了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 世界重生点","color":"green","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#1005设置边界中心点与世界重生点
execute as @a[tag=admin,scores={SystemAdmin=1005}] at @s run spreadplayers ~ ~ 10 20 false @a[distance=0.1..]
execute at @a[tag=admin,scores={SystemAdmin=1005}] align xyz positioned ~ ~1 ~ run worldborder center ~ ~
execute at @a[tag=admin,scores={SystemAdmin=1005}] align xyz positioned ~ ~1 ~ run setworldspawn ~ ~ ~
execute as @a[tag=admin,scores={SystemAdmin=1005}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 在其位置设置了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 世界重生点","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 与","color":"white","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 边界中心点","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=1000..1005}] SystemAdmin 0


#1010关闭性能模式
execute if entity @a[tag=admin,scores={SystemAdmin=1010}] run scoreboard players set IsFastGame SystemAdmin 0
execute as @a[tag=admin,scores={SystemAdmin=1010}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 关闭了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 性能模式","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#1011开启性能模式
execute if entity @a[tag=admin,scores={SystemAdmin=1011}] run scoreboard players set IsFastGame SystemAdmin 1
execute as @a[tag=admin,scores={SystemAdmin=1011}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 开启了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 性能模式","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=1010..1011}] SystemAdmin 0

#1010关闭自然回血
execute if entity @a[tag=admin,scores={SystemAdmin=1020}] run gamerule naturalRegeneration false
execute as @a[tag=admin,scores={SystemAdmin=1020}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 关闭了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 自然回血","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#1011开启自然回血
execute if entity @a[tag=admin,scores={SystemAdmin=1021}] run gamerule naturalRegeneration true
execute as @a[tag=admin,scores={SystemAdmin=1021}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 开启了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 自然回血","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=1020..1021}] SystemAdmin 0

#1110立即停止大逃杀对局
execute unless score IsTheDieOutGame SystemAdmin matches 1.. as @a[tag=admin,scores={SystemAdmin=1110}] run tellraw @s [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":" 当前没有正在执行的","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 大逃杀对局","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if score IsTheDieOutGame SystemAdmin matches 1.. as @a[tag=admin,scores={SystemAdmin=1110}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 停止了当前的","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 大逃杀对局","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if score IsTheDieOutGame SystemAdmin matches 1.. as @a[tag=admin,scores={SystemAdmin=1110}] run function nw:system/system_module/dieout_util_gameover

#1111立即开启一局大逃杀游戏
execute as @a[tag=admin,scores={SystemAdmin=1111}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 开启了一局","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 大逃杀游戏","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if entity @a[tag=admin,scores={SystemAdmin=1111}] run scoreboard objectives setdisplay sidebar DieOutInfo
execute if entity @a[tag=admin,scores={SystemAdmin=1111}] run tellraw @a [{"text":"[大逃杀] ","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"已开启大逃杀对局，请选择您的","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"英雄","color":"light_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"\n未选择视为不加入本次对局","color":"gray","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if entity @a[tag=admin,scores={SystemAdmin=1111}] run scoreboard players set IsTheDieOutGame SystemAdmin 2
execute if entity @a[tag=admin,scores={SystemAdmin=1111}] run scoreboard players set UpdateCount DieOutInfo 0
execute if entity @a[tag=admin,scores={SystemAdmin=1111}] run scoreboard players set TimeClock DieOutInfo 60
scoreboard players set @a[tag=admin,scores={SystemAdmin=1110..1111}] SystemAdmin 0

#2000关闭黑夜狂欢
execute if entity @a[tag=admin,scores={SystemAdmin=2000}] run scoreboard players set IsNightRevelry SystemAdmin 0
execute as @a[tag=admin,scores={SystemAdmin=2000}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 关闭了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 黑夜狂欢","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#2001开启黑夜狂欢
execute if entity @a[tag=admin,scores={SystemAdmin=2001}] run scoreboard players set IsNightRevelry SystemAdmin 1
execute as @a[tag=admin,scores={SystemAdmin=2001}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 开启了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 黑夜狂欢","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=2000..2001}] SystemAdmin 0

#3000关闭逢魔时刻
execute if entity @a[tag=admin,scores={SystemAdmin=3000}] run scoreboard players set IsNightRevelry SystemAdmin 0
execute as @a[tag=admin,scores={SystemAdmin=3000}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 关闭了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 逢魔时刻","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#3001开启逢魔时刻
execute if entity @a[tag=admin,scores={SystemAdmin=3001}] run scoreboard players set IsNightRevelry SystemAdmin 1
execute as @a[tag=admin,scores={SystemAdmin=3001}] run tellraw @a [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"管理员 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 开启了","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 逢魔时刻","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=3000..3001}] SystemAdmin 0


#管理员命令错误
tellraw @a[tag=admin,scores={SystemAdmin=1..}] [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"   请 输 入 正 确 的 管 理 员 命 令","color":"white","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
scoreboard players set @a[tag=admin,scores={SystemAdmin=1..}] SystemAdmin 0


#管理员命令手册
give @a[tag=admin,nbt=!{Inventory:[{id:"minecraft:written_book",tag:{Tags:["AdminMenu"]}}]}] minecraft:written_book{Tags:["AdminMenu"],display:{Name:'[{"text":"管理员操作手册","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]'},Enchantments:[{id:"minecraft:loyalty",lvl:10}],title:"关于此游戏",author:"Hoct",pages:['[{"text":"管理员操作手册 1页\\n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"作者: Hoct\\n\\n","color":"black","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"1、开启无消耗模式\\n","color":"black","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"hoverEvent":{"action":"show_text","value":"加入游戏不消耗金币"},"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set -1"}},{"text":"2、开启观战模式\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"hoverEvent":{"action":"show_text","value":"需要输入/trigger SystemAdmin set 2手动关闭观战模式"},"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set -2"}},{"text":"3、关闭性能模式\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"hoverEvent":{"action":"show_text","value":"点击关闭性能模式（推荐）"},"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1010"}},{"text":"4、开启性能模式\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"hoverEvent":{"action":"show_text","value":"点击开启性能模式"},"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1011"}},{"text":"5、开启一局大逃杀游戏\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"hoverEvent":{"action":"show_text","value":"无需投票开启一局大逃杀游戏，\\n慎重操作，点击后将进入大逃杀游戏模式"},"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1111"}},{"text":"6、立即终止大逃杀对局\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"hoverEvent":{"action":"show_text","value":"若大逃杀对局正在进行中\\n则立即停止本次的大逃杀游戏"},"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1110"}}]'                             ,'[{"text":"管理员操作手册 2页\\n\\n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"1、关闭边界模式\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1000"},"hoverEvent":{"action":"show_text","value":"点击关闭边界"}},{"text":"2、启用小型边界\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1001"},"hoverEvent":{"action":"show_text","value":"点击开启30*30世界边界（适合**1v1对抗**）"}},{"text":"3、启用中型边界\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1002"},"hoverEvent":{"action":"show_text","value":"点击开启100*100世界边界"}},{"text":"4、启用大型边界（推荐）\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1003"},"hoverEvent":{"action":"show_text","value":"点击开启250*250世界边界（适合多人混战）"}},{"text":"5、设置世界重生点\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1004"},"hoverEvent":{"action":"show_text","value":"点击将当前坐标设置为世界重生点\\n一般直接点第6项"}},{"text":"6、设置重生点与边界中心点\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 1005"},"hoverEvent":{"action":"show_text","value":"点击将当前坐标设置为\\n世界重生点与边界中心点"}}]'                             ,'[{"text":"管理员操作手册 3页\\n\\n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"1、关闭黑夜狂欢\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 2000"},"hoverEvent":{"action":"show_text","value":"点击关闭黑夜狂欢模式"}},{"text":"2、开启黑夜狂欢（默认）\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 2001"},"hoverEvent":{"action":"show_text","value":"点击开启黑夜狂欢模式\\n当时间到晚上时有所表现"}},{"text":"3、关闭逢魔时刻\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 3000"},"hoverEvent":{"action":"show_text","value":"点击关闭逢魔时刻"}},{"text":"4、开启逢魔时刻（默认）\\n\\n","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/trigger SystemAdmin set 3001"},"hoverEvent":{"action":"show_text","value":"点击开启逢魔时刻\\n到晚上固定时间时有所表现"}}]'],HideFlags:1} 1
